Packet data networks are generally built on a multi-layer communication model, such as the Open Systems Interconnection (OSI) model. The lowest layer in the model, referred to as Layer 1, is the physical layer (PHY), in which a transmitter transmits a raw bit stream over a physical medium to a receiver. The next layer (Layer 2) is the data link layer, which provides a protocol for reliable transmission of data frames, also referred to as packets, between two nodes connected by a physical layer. Common data link layer protocols include Ethernet and InfiniBand Layer 2.
In many networks, error detection and/or error correction capabilities are built into the Layer 1 protocol. For example, the Layer 1 protocol may provide for forward error correction (FEC), in which redundant bits are added to the data stream by the transmitter and can then be used by the receiver in detecting and correcting bit errors. Many FEC schemes use block codes, such as Reed-Solomon, BCH, parity, or Hamming codes.
In some applications, issues of latency may be taken into account in designing error correction logic. For example, U.S. Patent Application Publication 2017/0012738 describes techniques for minimizing latency and/or power consumption for communications on a link. Upon determining that a cyclic redundancy check (CRC) for a portion of a received stream of bits is valid, the portion of the stream of bits is forwarded without performing forward error correction (FEC) decoding for the first portion. Upon determining that a CRC for the portion of the stream of bits is invalid, FEC decoding is performed for the portion before forwarding the portion of the stream of bits.